// test.js
var chart = require("../../utils/chart.js");
Page({

  data: {
  },
  onLoad: function (options) {
    console.log('载入');
    chart.draw(this, 'canvas1', {
      title: {
        text: "用户价值排名",
        color: "#333333"
      },
      xAxis: {
        data: ['惠玉祥', '王璐', '章钦', '黄馨', '王楚', '龚正', '马小乔']
      },
      series: [
        {
          name: "第一季度",
          category: "bar",
          data: [89, 63, 56, 18, 9, 6, 5]
        },
  
      ]
    });
    chart.draw(this, 'canvas2', {
      title: {
        text: "用户兴趣度排名",
        color: "#333333"
      },
      xAxis: {
        data: ['王楚', '马小乔', '惠玉祥', '黄馨', '章钦', '龚正', '王璐']
      },
      series: [
        {
          name: "第一季度",
          category: "bar",
          data: [99, 74, 36, 18, 12, 7, 5]
        },
  
      ]
    });
    chart.draw(this, 'canvas3', {
      title: {
        text: "商品吸引力排名",
        color: "#333333"
      },
      xAxis: {
        data: ['纪梵希', 'GUCCI', 'COACH', 'LV', 'vero moda', 'PRADA', 'MAC']
      },
      series: [
        {
          name: "第一季度",
          category: "bar",
          data: [92, 88, 76, 68, 12, 7, 5]
        },
  
      ]
    });
    
    chart.draw(this, 'canvas4', {
      title: {
        text: "问答机器人回答问题数量随时间分布（单位：个/min）",
        color: "#333333"
      },
      xAxis: {
        data: ['10', '20', '30', '40', '50', '60', '70', '80']
      },
      series: [
       
        {
          name: "总弹幕数量",
          category: "line",
          data: [379,735, 1738, 5800, 3248, 1527, 1443, 1935]
        },
        {
          name: "应答机器人回答数量",
          category: "line",
          data: [79,75, 238, 300, 328, 147, 143, 95]
        },
        
      ]
    });
    chart.draw(this, 'canvas5', {
      title: {
        text: "导购机器人推送商品随时间分布（单位：个/min）",
        color: "#333333"
      },
      xAxis: {
        data: ['10', '20', '30', '40', '50', '60', '70', '80']
      },
      series: [
       
        {
          name: "总弹幕数量",
          category: "line",
          data: [379,735, 1738, 5800, 3248, 1527, 1443, 1935]
        },
        {
          name: "导购机器人推送次数",
          category: "line",
          data: [169,375, 1238, 1300, 928, 847, 943, 795]
        },
        
      ]
    });
  },
  onSaveClick: function () {
    chart.saveCanvans(function () {

    });
  },
  onHighLightClick:function(){

    
  }
})